<template>
    <div>
        <div class="table-title">
            商品分类查看
        </div>
        <div class="table-padding">
            <br>
            <table class="table" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                   <tr>
                       <th>商户</th>
                       <td>{{details.merchantId}}</td>
                   </tr>
                   <tr>
                       <th>菜类编码</th>
                       <td>{{details.no}}</td>
                   </tr>
                   <tr>
                       <th>菜类名称</th>
                       <td>{{details.name}}</td>
                   </tr>
                   <tr>
                       <th>菜类英文名</th>
                       <td>{{details.nameEn}}</td>
                   </tr>
                   <tr>
                       <th>备注</th>
                       <td>{{details.remark}}</td>
                   </tr>
                   <tr>
                       <th>状态</th>
                       <td>{{details.state}}</td>
                   </tr>
                </tbody>
            </table>
            <br>
            <el-button  type="success" @click="goBack()">返回</el-button>
        </div>
    </div>
</template>
<script>
    //注意路径
    export default{
        data(){
            return {
                details:{}
            }
        },
        created(){
            window.this = this;
            this.$http.get("dishesCategorys/"+this.$route.query.id).then(function(data){
                if(data.body.status==200){
                    this.details=data.body.content;
                }else{
                    this.$message.error(data.body.message);
                }
            })
        },
        methods: {
            goBack() {
                this.router.go(-1);
            }
        }
    }
</script>
<style scoped>

</style>
